import search from "./search/search.js";
import salesAnalysis from "./salesAnalysis/index.vue";

export default {
    mixins: [search],
    components: {
        salesAnalysis,
    },
    data() {
        return {
            keyName: "1",
            tab: {
                salesAnalysis: "销量分析",
            },
        }
    },
    mounted() {
        this.getList()
    },
    methods: {
        callback(key) {
            this.keyName = key
            this.$refs['search'].resetSearch()  //tab切换清空搜索条件
            switch (this.keyName) {
                case '1':
                    this.$refs.salesAnalysis.getList() //销量分析列表
                    break;
                default:
                    break;
            }
        },
        getList() {
            this.$refs.salesAnalysis.getList()       //销量分析列表
        },
    }
}